package com.itheima.config;

import cn.itcast.AliyunOSSOperator;
import cn.itcast.OperatorProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(OperatorProperties.class)

public class ItcastConfig {

    @Bean
    public AliyunOSSOperator aliyunOSSOperator(OperatorProperties operatorProperties) {
        return new AliyunOSSOperator(operatorProperties);
    }
}
